package com.zp.datax.core.model;

import lombok.*;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class DataxJobTrigger implements Serializable {

    //主键
    private Integer sysId;
    //任务编码
    private Integer taskId;
    //表达式
    private String cron;
    //job存储路径
    private String path;
    //名称
    private String name;
    //下一次执行时间
    private Long nextFireTime;
    //上一次执行时间
    private Long prevFireTime;
    //任务开始时间
    private Long startTime;
    //任务结束时间
    private Long endTime;
    //业务数据最小id
    private Long minid;
    //业务数据最大id
    private Long maxid;
    //业务数据开始时间
    private Long bizStarTime;
    //业务数据结束时间
    private Long bizEndTime;
    //job本身状态；0-正常；1-运行中；
    private Integer runStatus;
    //job执行返回结果状态；200-正常；500-异常；
    private Integer rtvStatus;
    private String params;
    private Integer range;
    private Integer unit;

    /**
     * 重围
     *
     * @return
     */
    public void reset() {
        this.startTime = null;
        this.endTime = null;
        this.bizStarTime = null;
        this.bizEndTime = null;
        this.minid = null;
        this.maxid = null;
    }

}
